<!-- BEGIN: MAIN -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>{site_title}{title}</TITLE>
<link rel="stylesheet" href="../css/template_css.css" type="text/css" />
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function del(ID,type,page){
	if(confirm('Are you sure you want delete this row?')==true){
		location.href = 'faqDelete.php?ID='+ID+'&type='+type+'&page='+page;
	}
}
function update_org_site() {
	var f = document.frmData;
	var obj = f.elements["chkIsView[]"];
	if (obj){
		var del = false;
		if (obj.length) {
			for (i=0;i<obj.length;i++)
				if (obj[i].checked==true) del=true;
		} else {
			if (obj.checked==true) { del=true; }
		}
	}
	f.ac.value="update";
	f.action="{PHP.PHP_SELF}";
	f.target="_self";
	f.submit();
}
function onlyNumber()
{
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
}
function onlyFloat()
{
	if((event.keyCode>=48)&&(event.keyCode<=57)||(event.keyCode==46))
	   event.returnValue=true;
	else
	   event.returnValue=false;
}
function check_all(val) {
	var f = document.frmData;
	if(val=='delete'){
		var value=f.chkAll.checked;
		var obj = f.elements["checked_delete[]"];
	}else{
		var value=f.chkActive.checked;
		var obj = f.elements["chkIsActive[]"];
	}	

	if (obj) 
	{
		if (obj.length) 
			for (i=0;i<obj.length;i++)
				obj[i].checked = value;
		else
			obj.checked = value;
	}
}
function del_all() {
	var f = document.frmData;
	var obj = f.elements["checked_delete[]"];
	if (obj) {
		var del = false;
		if (obj.length) {
			for (i=0;i<obj.length;i++)
				if (obj[i].checked==true) del=true;
		} else {
			if (obj.checked==true) { del=true; }
		}
		if (del==false) {
			alert("Please check before to delete?");
		} else {
		   if(confirm('Are you sure to delete?')==true){
				f.ac.value="delete";
				f.action="{PHP.PHP_SELF}";
				f.target="_self";
				f.submit();
		   }	
		}
	}
}	
//-->
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px;">
  {header_panel}
  <tr> 
    <td width="150" valign="top" bgcolor="#F1F3F5">
	{left_panel}
	</td>
    <td width="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr bgcolor="#F1F3F5"> 
          <td width="2" valign="top"></td>
          <td colspan="2" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td colspan="2"><table width="100%" border="0" cellspacing="1" cellpadding="1" class="adminheading">
                    <tr bgcolor="#EFEFEF"> 
                      <th>{title}</th>
                    </tr>
					<tr bgcolor="#EFEFEF"><td>
					<form name="frmSearch" method="post" action="faq.php">
                      <input name="page" value="{page}" type="hidden">
                      <tr> 
                        <td height="28" colspan="10"><div align="left"><strong>{lbl_search}:</strong> 
							<select name="country_id" class="field">									
								<option value="">--Select country--</option>
								{cbo_country} 
							 </select>
                            <input class="field" name="key" value="{key}" type="text" size="30" {type_vietnamese}>
                            <input  class="button" type="button" name="search" value="{lbl_search}" onClick="javascript:document.frmSearch.submit()">
                            </div></td>
                      </tr>
                    </form>
					</td></tr>
                  </table></td>
              </tr>
			  <tr> 
                <td height="430" valign="top" colspan="2"> 
				<form name="frmData" method="post" action="faq.php">
                  <input type="hidden" name="ac" value="{ac}">
                  <input type="hidden" name="page" value="{page}">
                  <input type="hidden" name="key" value="{key}">
                  <table width="100%" class="adminlist" cellpadding="0" cellspacing="0">
				  <tbody>
				    <tr class="menubar"> 
                      <td height="20" colspan="10" align="right">
					  <input type="button" name="Button" value="{lbl_update}" onClick="javascript:update_org_site();;" align="right" class="button"> 
					  <input type="button" name="Button" value="{lbl_addnew}" onClick="javascript:location.href='faqWrite.php';" align="right" class="button"> 
                      </td>
                    </tr>
                    <tr> 
                      <th>{lbl_no}</th>
                      <th>{lbl_name}</th>
                      <th>{lbl_position}</th>
                      <th>{lbl_active}<input type="checkbox" id="chkActive" name="chkActive" onClick="check_all('active');" /></th>
                      <th>{lbl_edit}/{lbl_delete}</th
                    ></tr>
                    <!-- BEGIN: list -->					
					<input type="hidden" name="hiddenID[]" value="{list.faq_id}">
                    <tr class="row0"> 
                      <td>{list.OrderNo}</td>
                      <td>{list.faq_name}</td>
                      <td><input class="field" name="textbox1[]" type="text" size="3" maxlength="3" value="{list.faq_position}" onKeyPress="onlyNumber()"></td>
                     <td><input type="checkbox" name="chkIsActive[]" value="{list.faq_id}~{list.ActiveSite}" {list.faq_isactive}></td>
                      <td><a href="faqWrite.php?ID={list.faq_id}&page={page}">{lbl_edit}</a> <a href="javascript:del('{list.faq_id}','DEL','{page}')">{lbl_delete}</a></td>
                    </tr>
                    <!-- END: list -->
					<tr class="menubar"> 
                      <td height="20" colspan="7" align="left">{lbl_total}: {numrec} {lbl_service}</td>
                    </tr>
                    <tr class="menubar"> 
                      <td height="20" colspan="10" align="center">&nbsp; {pages} 
                      </td>
                    </tr>
                    <tr class="menubar"> 
                      <td height="20" colspan="10" align="right">
					  <input type="button" name="Button" value="{lbl_update}" onClick="javascript:update_org_site();;" align="right" class="button"> 
					  <input type="button" name="Button" value="{lbl_addnew}" onClick="javascript:location.href='faqWrite.php';" align="right" class="button"> 
                      </td>
                    </tr>
					</tbody>
                  </table>
				</form>
                </td>
              </tr>
              
            </table>
            </td>
        </tr>
      </table></td>
  </tr>
  {footer_panel}
</table>
 
</BODY>
</HTML>
<!-- END: MAIN -->